#include "Figura.h"
#include <math.h>

Figura::Figura(short x, short y)
{
	this->x = x;
	this->y = y;
	this->x0 = x;
	this->y0 = y;
}

Figura::~Figura(void)
{
}

short Figura::getX(){
	return x;
}
short Figura::getY(){
	return y;
}

short Figura::getX0(){
	return x0;
}
short Figura::getY0(){
	return y0;
}

double Figura::distanciaEntrePuntos(short x1,short y1, short x2, short y2){
	double aux = ((x1 - x2)*(x1 - x2)) + ((y1 - y2)*(y1 - y2));
	return sqrt (aux);
}

void Figura::moverA(short x, short y) {
	this->x = x;
	this->y = y;
}

void Figura::definirCero(short x, short y) {
	this->x0 = x;
	this->y0 = y;
	this->x = x;
	this->y = y;
}
